{extend name="index_form" /}

{block name="form"}
<form action="{:url('index/user/loginEvent')}" method="POST">
  <div>
    <input type="text" name='username'>
    <div class="changeinput">Username</div>
  </div>
  <div>
    <input type="password" name='password'>
    <div class="changeinput">Password</div>
  </div>
  <div class="post">
    <input type="submit" value="Login" class="submit">
  </div>
</form>
{/block}


{block name="index_form-script"}
{__block__}
<script>
  //登入
  // $Ajax({
  //   method: 'POST',
  //   url: 'http://localhost/homyit-work-3/public/index.php/index/user/loginEvent',
  //   data: {
  //     username: 'admin',
  //     password: '123456'
  //   },
  //   successFun(data) {
  //     console.log(data)
  //   },
  //   errorFun(err) {
  //     console.log(err)
  //   }
  // })
</script>
{/block}